<!DOCTYPE html>
<html lang="en">
<head>
	<{include file="header.html"}>
	<title>会员管理-营销中心-<{$user_data['school_name']}>-德安信会计在线教育平台</title>
</head>
<body>
<div class="wrap">
	<!--star left-->
	<div class="column">
		<{include file="left_menu.html"}>
	</div>
	<div id="ContMianBox">
		<!--star子栏目-->
		<div class="sub-colum">
		    <div class="tit">会员管理</div>
				<ul>
						<{foreach from=$left_menu_min.list item=item}>
						<li <{if $item['url'] == $left_menu_min.curr}>class="curr"<{/if}>><a href="<{$item['url']}>"><{$item['name']}></a></li>
						<{/foreach}>
				</ul>
		</div>
		<!--end子栏目-->
		<!--end left-->
		<div class="container narrow">
		    <!--star conter-->
		    <div class="cetContent">
					<div class="tit p-lr20">
					    <span class="curr">会员管理</span>
					</div>
					<!--star内容区域-->
					<div class="mainScroll">
					    <div class="mainContainer line-all">
					        <!--star tabMainCont-->
					        <div class="tabMainCont">

					            <!--star营销渠道-->
								<div class="tabMainCont">
									<!--star会员管理-->
									<fieldset class="layui-elem-field">
										<legend>筛选</legend>
										<div class="layui-field-box">
											<form class="layui-form layui-form-pane1" action="/users" method="post">
												<div class="layui-form-item">
													<div class="layui-inline">
														<input type="text" class="layui-input" style="width:200px;" placeholder="昵称" name="nick" value="<{if !empty($conditions['nick'])}><{$conditions['nick']}><{/if}>"/>
													</div>
													<div class="layui-inline">
														<input type="text" class="layui-input" style="width:200px;" placeholder="手机号" name="mobile" value="<{if !empty($conditions['mobile'])}><{$conditions['mobile']}><{/if}>"/>
													</div>

													<div class="layui-inline">
														<button type="submit" class="layui-btn">搜索</button>

													</div>
												</div>
											</form>
										</div>
									</fieldset>
									<!--商品列表 star-->
									<div class="goods_list p-t10">
										<div class="mtc_tab">
											<!--star mt-->
											<div class="mt">
												<a href="javascript:;" class="curr">全部</a>
											</div>
											<!--end mt-->
											<!--star mc-->
											<div class="mc">

												<table class="layui-table">
															<tbody>
																<tr>
																	<th>用户</th>
																	<th>推荐人</th>
																	<th>下级同学</th>
																	<!-- <th>一级同学</th>
																	<th>二级同学</th>
																	<th>三级同学</th> -->

																	<th>VIP</th>
																	<th>账户余额</th>
																	<th>累计佣金</th>
																	<th>注册时间</th>
																	<th>消费记录</th>
																	<th>操作</th>
																</tr>
															</tbody>
															<tbody>
																<{if isset($users) }>
																<{foreach from=$users item=item}>
																	<tr>
																		<td class=" tal">
																			<{$item[ 'mobile']}></br>
																			<{if $item['nick']}>
																			（<span class="c-ff6d5e"><{$item['nick']}></span>）
																			<{/if}>
																		</td>
																		<!-- <td class=" tal"><span class="c-ff6d5e"><{$item['nick']}></span></td> -->
																		<td><{$item[ 'parent1_mobile']}></td>
																		<td>
																		一级：<{$item[ 'parent1_count']}><br/>
																		二级：<{$item[ 'parent2_count']}><br/>
																		三级：<{$item[ 'parent3_count']}>
																		</td>
																		<!-- <td><{$item[ 'parent1_count']}></td>
																		<td><{$item[ 'parent2_count']}></td>
																		<td><{$item[ 'parent3_count']}></td> -->

																		<td>
																		<{if $item['is_vip']==1}>
																			<{$item['vip_start_day']|date_format: '%Y-%m-%d'}><br/>
																			<{if $smarty.now > $item['vip_expire_day']}>
																			已到期
																			<{else}>
																			<div class="colorBtn">
																				到期<{$item['vip_expire_day']|date_format: '%Y-%m-%d'}>
																			</div>


																			<{/if}>
																			<div class="colorBtn">
																				<p><a href="/users/setvip/<{$item['id']}>">续期</a></p>

																			</div>
																		<{else}>
																		<div class="colorBtn">
																				<p><a href="/users/setvip/<{$item['id']}>" onclick="return confirm('确定要升级为VIP吗？')">升级VIP</a></p>

																			</div>
																		<{/if}>
																		</td>
																		<td class=" tal">
																			<{$item[ 'balance']|string_format:'%.2f'}>
																		</td>
																		<td class=" tal">
																			<{$item[ 'commission_total']|string_format:'%.2f'}>
																		</td>
																		<td class=" tal">
																			<{$item[ 'add_time']|date_format: '%Y-%m-%d'}>
																		</td>
																		<td class=" tal">
																			<div class="colorBtn">
																			<a href="/users/order_list/<{$item.id}>">消费记录</a>
																		</div>
																	</td>
																		<td class=" tal">

																		<div class="colorBtn">
																		<a href="/student/change_pwd/<{$item.id}>">重置密码</a>
																		<br>
																		<a href="/users/detail/<{$item.id}>">课程明细</a>
																	</div>

																		</td>

																	</tr>
																	<{/foreach}>
																	<{/if}>
															</tbody>
														</table>
												<div class="pages p-tb20" style="text-align:right;">
													<{if isset($pagination)}><{$pagination}><{/if}>
												</div>
											</div>
											<!--end mc-->
										</div>

									</div>
									<!--商品列表 end -->
									<!--star会员管理-->
								</div>
					            <!--end营销渠道-->


					        </div>
					        <!--end tabMainCont-->
					        </div>

					    </div>
					</div>
					<!--end内容区域-->

		</div>


	</div>
</div>
<{include file="footer.html"}>
</body>
</html>
